/*
 * Created on May 19, 2005
 *
 */
package org.mushroomdb.filemanagement.diskspace.impl;

import org.mushroomdb.filemanagement.diskspace.PageMapper;

/**
 * @author Matias
 *
 */
public class IdentityPageMapper implements PageMapper {

	/**
	 * @see org.mushroomdb.filemanagement.diskspace.PageMapper#getPhysicalNumber(long)
	 */
	public long getPhysicalNumber(long logicalNumber) {
		return logicalNumber;
	}

	/**
	 * @see org.mushroomdb.filemanagement.diskspace.PageMapper#mapLogicalNumber(long, long)
	 */
	public void mapLogicalNumber(long logicalNumber, long physicalNumber) {
		if (logicalNumber != physicalNumber) {
			throw new IllegalArgumentException("Cannot map different numbers."); //$NON-NLS-1$
		}
	}

	/**
	 * @see org.mushroomdb.filemanagement.diskspace.PageMapper#removeMapping(long)
	 */
	public void removeMapping(long logicalNumber) {
	}

}
